<html>
	<head>
		<meta charset="utf-8">
		<title>Demo</title>
		<script type="text/javascript" src="jquery-1.11.3.min.js"></script>
		<script type="text/javascript" src="jquery.router.history.min.js"></script>
	</head>
	<body>
		<button type="button" id="btn">添加历史记录</button>
		<button type="button" id="btnReload">重新加载</button>
		<script type="text/javascript">
			var his = $.history(function(title, router, data, dir) {
				alert((dir < 0 ? "返回" : (dir > 0 ? "前进" : "重新加载")) + "," + title + ", data.name:" + data.name);
			});
			var btn = document.getElementById("btn");
			var index = 0;
			btn.onclick = function() {
				$.history().push("历史" + index, "router" + index, {name:"data" + index ++});
			}
			var btnReload = document.getElementById("btnReload");
			btnReload.onclick = function() {
				$.history().reload();
			}
			
		</script>
	</body>
</html>